#ifndef RECORDER_H
#define RECORDER_H

#pragma once

#include <stdio.h>
#include <fstream>
#include <XnOpenNI.h>
#include <XnLog.h>
#include <XnCppWrapper.h>
#include <XnPropNames.h>
#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <QDir>
#include <QDateTime>
#include <QFileInfo>
#include <QDebug>
#include <QCoreApplication>


#define MAXGENERATORS 15
#define MAXFOLDERNAME 300
#define FPS	30
#define RES_X 640
#define RES_Y 480
#define START 1
#define STOP  2
#define CHECK_RC(rc, what)											\
    if (rc != XN_STATUS_OK)											\
    {																\
        printf("%s failed: %s\n", what, xnGetStatusString(rc));		\
        return rc;													\
    }

struct XNFiles{
    char name[MAXFOLDERNAME];
};


using namespace std;
using namespace xn;

class recorder
{
public:
    recorder();
    int record();
    int Recording;
private:
    void CleanFiles(vector<XNFiles>& CurrentRecordFiles);
    void write_metadata(QString path,char* name_related,int option);
};
#endif // RECORDER_H
